package com.rzn.reading.mapper;

import com.rzn.reading.dto.PageParams;
import com.rzn.reading.entity.LiteratureDetail;
import com.rzn.reading.model.dto.literature.LiteratureDetailDTO;
import com.rzn.reading.model.dto.literature.LiteratureItemListDTO;
import com.rzn.reading.model.dto.literature.LiteratureQueryParam;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface LiteratureDetailMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(LiteratureDetail record);

    LiteratureDetail selectByPrimaryKey(Integer id);

    List<LiteratureDetail> selectAll();

    int updateByPrimaryKey(LiteratureDetail record);

    List<LiteratureItemListDTO> selectByPage(LiteratureQueryParam pageParams);

    LiteratureDetailDTO selectLiteratureDetailById(Integer id);

    List<LiteratureDetail> getLiteratureByUserId(Integer userId);

    Integer selectAllCount();
}